public class Main {
    public static void main(String[] args) {
        String[] arr = {"abcedf", "98u", "yyt", "zut"};

        Alg<String> alg = new Alg<>();
        String s = alg.max(arr);
        System.out.println(s);

        Alg2 alg2 = new Alg2();
        String s1 = alg2.max(arr);
        System.out.println(s1);
    }
    public static void main1(String[] args) {
        MyArray<Integer> myArray = new MyArray<>();

        myArray.setArray(0, 10);
        myArray.setArray(1,5);
        int a0 = myArray.getArray(0);
        int a1 = myArray.getArray(1);
        System.out.println(a0);
        System.out.println(a1);

        MyArray<String> myArray1 = new MyArray<>();

        myArray1.setArray(0, "hello");
        myArray1.setArray(1, "world");
        String s0 = myArray1.getArray(0);
        String s1 = myArray1.getArray(1);
        System.out.println(s0);
        System.out.println(s1);
    }
}
